package com.wooboo.server.ext.action.redis;

import com.wooboo.server.ext.ApiError;
import com.wooboo.server.ext.Result;
import com.wooboo.server.ext.action.traffic.Charge;
import com.wooboo.server.ext.action.traffic.Register2;
import com.wooboo.server.ext.util.Parameters;

public class DoMain {

	public static void main(String[] args ){
		try {
			DoMain.register();
		} catch (ApiError e) {
			System.out.println(e.toString());
			//e.printStackTrace();
		}
	}
	
	/*
	 * business_term=12&
	 * city_name=深圳&
	 * company_addr=公司地址&
	 * company_industry=0&
	 * company_name=蜂巢二期测试2&
	 * company_nature=0&
	 * company_type=0&
	 * contact_mobile=13454545454&
	 * contacts=contacts
	 * &create_time=20170101111111&
	 * foundation_date=2010-11-12&
	 * legal_person=legal_person&
	 * legal_person_id_no=111111111111112233&
	 * legal_person_mobile=135103298354&
	 * method=companyRegisterApply&
	 * portalID=8000000245&
	 * portalType=WAP&
	 * province_name=广东&
	 * registration_no=333333&
	 * registration_type=BL&
	 * sign=12344&
	 * transactionID=201512141320063450
	 * */
	public static void register() throws ApiError{
		Parameters param = new Parameters();
		param.addField("company_name", "我的");
		param.addField("advertiserId", "155");
		Register2 register = new Register2();
	    register.initParameters(param);
	    Result result = register.invokeService();
	    System.out.println(result.getResponseString());
	}
	public static void charge() throws ApiError{
		Parameters param = new Parameters();
		//param.addField("company_name", "我的世界");
		param.addField("id", "156");
		Charge charge = new Charge();
		charge.initParameters(param);
	    Result result = charge.invokeService();
	    System.out.println(result.getResponseString());
	}
}
